var last_clicked="";

function showlayer(layer){
var myLayer=document.getElementById(layer);

if (last_clicked==""){
last_clicked=document.getElementById(layer);
}

if((myLayer.style.display=="none" || myLayer.style.display=="") && last_clicked.style.display=="block"){
last_clicked.style.display="none";
myLayer.style.display="block";
last_clicked = myLayer;
} else if(myLayer.style.display=="none" || myLayer.style.display==""){
myLayer.style.display="block";
last_clicked = myLayer;
} else {
myLayer.style.display="none";
}
}

function action_add()
{
//	this.form.action="/ReqTrack/procedure_requirements/link";
	document.forms['ProcedureRequirementAddForm'].action="/ReqTrack/procedure_requirements/link";
	this.form.submit();
}

function action_del()
{
//	this.form.action="/ReqTrack/procedure_requirements/unlink";
	document.forms['ProcedureRequirementAddForm'].action="/ReqTrack/procedure_requirements/unlink";
	this.form.submit();
}
